package user

import (
	"gddgame.cc/galaxy/common/dsl/game"
)

const providerName = "user"

const UserName = "user"

const UserItemName = "user_item"

func init() {
	_ = game.RegisterGlobalModule(game.ModuleProvider{
		Name:    providerName,
		Depends: []string{"stat"},

		OnInit: func(env *game.Environment) error {
			var err error
			if _, err = env.RegisterModel(UserGameName, &UserGame{}); err != nil {
				return err
			}
			if _, err = env.RegisterModel(UserMessageName, &UserMessage{}); err != nil {
				return err
			}
			return nil
		},
	})
}
